textNumber is a freeware HyperCard external function that turns numbers into full-length phrases. So, 43283 becomes “fourty-three thousand, two hundred and eighty-three.” textNumber can also handle fractions and divisions, so that it can change “1.42” into “one point four two” and “2/3” into “two thirds.”
Installing the XFCN
-------------------
To install textNumber, open the accompanying ResEdit 2.1 document and copy the XFCN resource into your source stack. If you would like to use textNumber in all your stacks, paste it into your Home stack. (If you do not own ResEdit, you can use the Resource Mover, in the Power Tools stack.)
1. Open the file “textNumber XFCN 1.0” in ResEdit 2.1.
2. Choose Select All from the Edit menu.
3. Choose Copy from the Edit menu.
4. Choose Open… from the File menu.
Select the stack to copy the XFCN into, then click Open.
If the stack does not contain any other resources,
ResEdit will ask if you want to add a resource fork to the
file. Click OK.
5. Choose Paste from the Edit menu.
6. Choose Save from the File menu.
7. Choose Quit from the File menu.
Using the textNumber XFCN
-------------------------
The format for calling textNumber is:
textNumber ( <number or string> [, <possessive>] [, <plural>] )
where:
<number or string> is a simple integer (such as “10”), a decimal
number (such as “2.765347”), or a string (such as "-2/3").
<possessive> is either true or false, and changes “three”
to “third”, for instance.
<plural> is either true or false, and simply adds an “s”
Both the <describe> and <plural> operators are optional. Passing "?" or "!" return on-line help or version information, respectively.
Known Limitations
-----------------
In version 1.0,
• textNumber will correctly translate any number between
-2,147,483,646 to 2,147,483,646. Numbers outside this
range may produce unpredictable results.
• mathematical symbols other than “.” and “/” are not parsed.
Passing the string "12*5" as the number will return an error.
• passing 1/4 (NOT a string), as in:
textNumber (1/4)
will return “zero point two five,” but passing "1/4," as in:
textNumber ("1/4")
will return “one quarter.”
Licensing Information
---------------------
This software is FreeWare, but not in the Public Domain. You may use and distribute this software freely, so long as you distribute this document with it. You may distribute this XFCN in your stacks, providing that they are also freeware, and that you credit the author in your software or its documentation.
You may NOT distribute this software for shareware or commercial use without the author’s express permission.
Disclaimer
----------
ALTHOUGH EVERY EFFORT HAS BEEN MADE TO MAKE THIS SOFTWARE RELIABLE AND STABLE, SIMON POISSON (THE SOFTWARE AUTHOR) MAKES NO WARRANTIES (EITHER EXPRESS OR IMPLIED) AS TO THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. THE SOFTWARE AUTHOR ACCEPTS NO RESPONSIBILITY FOR ANY AND ALL DAMAGES INCURRED THROUGH THE USE (OR MISUSE) OF THIS SOFTWARE. (BOTTOM LINE: USE THIS SOFTWARE AT YOUR OWN RISK.)
Reporting Bugs
--------------
If you discover a situation where textNumber does not perform entirely to your satisfaction, or have ideas as to how it could be enhanced, please contact me as per below.
By The Same Author
------------------
Script Optimizer 1.0.1
A HyperTalk optimizer with an easy-to-use,
graphical interface. Abbreviates keywords,
removes comments, and deletes unused globals.
Myst Hints 1.0
View multiple clues (from subtle hints, to stronger
'suggestions') to specific questions in 6 categories.
TarotWorks 1.0 (June 1994)
A full-color, extendable Tarot card program for
generating Tarot card readings on your computer
or by hand, using a variety of layouts (or 'spreads').
Icon Vault Package 1.0
Collection of 17 System 7 Finder icon vaults to add new
colour icons to applications, extensions, and documents.
Faster Finder 7.rsrc
A quick ResEdit hack to inhibit zoom rectangles, add a Quit
command to the File menu, and add command keys for the